package com.dragonboat.repository;

import com.dragonboat.entity.Organizer;
import com.dragonboat.entity.Team;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface OrganizerRepository extends JpaRepository<Organizer, Integer> {
    Optional<Organizer> findByOrganizerName(String organizerName);
    Optional<Organizer> findById(Integer organizerId);

    // 添加这个方法
    boolean existsByOrganizerName(String organizerName);

}